package com.ad.pet.app.photo.model;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * Created by z on.
 * Des:图片相册model
 * Date: 2017/3/31
 */

public class ImageBucket implements Parcelable {
    private String bucketName;//相册名
    private List<ImageItem> imageList;//相册中图片列表


    public String getBucketName() {
        return bucketName;
    }

    public void setBucketName(String bucketName) {
        this.bucketName = bucketName;
    }

    public List<ImageItem> getImageList() {
        return imageList;
    }

    public void setImageList(List<ImageItem> imageList) {
        this.imageList = imageList;
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.bucketName);
        dest.writeTypedList(this.imageList);
    }

    public ImageBucket() {
    }

    protected ImageBucket(Parcel in) {
        this.bucketName = in.readString();
        this.imageList = in.createTypedArrayList(ImageItem.CREATOR);
    }

    public static final Creator<ImageBucket> CREATOR = new Creator<ImageBucket>() {
        @Override
        public ImageBucket createFromParcel(Parcel source) {
            return new ImageBucket(source);
        }

        @Override
        public ImageBucket[] newArray(int size) {
            return new ImageBucket[size];
        }
    };
}
